<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>在线更新</title>
    <link href="/favicon.ico" rel="icon">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="<?=adminassets?>assets/pear/component/pear/css/pear.css" />
    <style>
        .layui-card {
            margin: 15px;
            box-shadow: 0 2px 8px rgba(0,0,0,.08);
            border-radius: 8px;
        }
        .layui-card-header {
            height: auto;
            line-height: 30px;
            padding: 15px 20px;
            border-bottom: 1px solid #f0f0f0;
            font-size: 16px;
            font-weight: 500;
            display: flex;
            align-items: center;
        }
        .layui-card-header i {
            margin-right: 8px;
            font-size: 18px;
            color: #5FB878;
        }
        .layui-card-body {
            padding: 20px;
        }
        .page-title {
            font-size: 18px;
            color: #333;
            margin: 0 0 20px 0;
            line-height: 1.5;
        }
        .update_conter {
            background: #f8f8f8;
            border-radius: 8px;
            padding: 25px;
            margin-bottom: 25px;
            border: 1px solid #eee;
        }
        .update_tips {
            font-size: 14px;
            color: #666;
            line-height: 1.8;
        }
        .pear-btn {
            height: 38px;
            line-height: 38px;
            padding: 0 25px;
            font-size: 14px;
            border-radius: 4px;
            transition: all .3s;
        }
        .pear-btn-primary {
            background-color: #5FB878;
            color: #fff;
        }
        .pear-btn-primary:hover {
            background-color: #4FA868;
        }
        .layui-btn-primary {
            border: 1px solid #ddd;
            margin-left: 10px;
        }
        .layui-timeline {
            padding: 15px;
            max-height: 600px;
            overflow-y: auto;
        }
        .layui-timeline-item {
            position: relative;
            padding-bottom: 20px;
        }
        .layui-timeline-title {
            font-size: 16px;
            color: #5FB878;
            margin-bottom: 10px;
        }
        .layui-timeline-content {
            padding-left: 25px;
            color: #666;
        }
        .update-list {
            margin: 10px 0;
            padding-left: 20px;
        }
        .update-list h4 {
            color: #333;
            margin: 15px 0 8px;
            font-weight: 500;
        }
        .update-list ul {
            list-style: none;
            padding-left: 0;
        }
        .update-list li {
            position: relative;
            padding: 4px 0 4px 15px;
            line-height: 1.6;
        }
        .update-list li:before {
            content: "";
            position: absolute;
            left: 0;
            top: 12px;
            width: 4px;
            height: 4px;
            background: #5FB878;
            border-radius: 50%;
        }
        @media (max-width: 768px) {
            .layui-card {
                margin: 10px;
            }
            .layui-input-block {
                margin-left: 0;
            }
            .layui-btn-primary {
                margin: 10px 0 0 0;
                display: block;
                width: 100%;
            }
            .layui-timeline {
                max-height: 400px;
            }
        }
    </style>
</head>
<body class="pear-container">
    <div class="layui-row">
        <div class="layui-card">
            <div class="layui-card-header">
                <i class="layui-icon layui-icon-update"></i> 在线更新
            </div>
            <div class="layui-card-body">
                <form class="layui-form">
                    <h4 class="page-title">当前版本序列号：V<?= Version ?></h4>
                    <div class="update_conter">
                        <div class="update_tips">
                            <?= $res['msg'] ?>
                            <br>
                            写入文件①（推荐）
                            <?=$kedu?>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block" style="margin-left: 0;">
                            <?php if($res['code']==1): ?>
                                <button class="pear-btn pear-btn-primary" lay-submit lay-filter="Check">
                                    <i class="layui-icon layui-icon-download-circle"></i> <?=$anniu?>
                                </button>
                            <?php else: ?>
                                <button class="pear-btn pear-btn-primary"><?=$anniu?></button>
                            <?php endif; ?>
                            <a href="<?=$XFapi_url?>" class="layui-btn layui-btn-primary">
                                <i class="layui-icon layui-icon-home"></i> 官网
                            </a>
                        </div>
                    </div>
                </form>
            </div>
        </div>

        <div class="layui-card">
            <div class="layui-card-header">
                <i class="layui-icon layui-icon-log"></i> 更新日志
            </div>
            <div class="layui-card-body">
                <div class="layui-timeline">
                    <div class="layui-timeline-item">
                        <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
                        <div class="layui-timeline-content layui-text">
                            <div class="update-list">
                                <h3 class="layui-timeline-title">最新版本号：<?=$newup?></h3>
                                <div class="update-list">
                                    <?=$uplogtxt?>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="<?=adminassets?>assets/pear/component/layui/layui.js"></script>
    <script src="<?=adminassets?>assets/pear/component/pear/pear.js"></script>
    <script src="<?=adminassets?>assets/js/core_js/Update.js"></script>
</body>
</html>